package com.obelisco.vista.componentes;

import java.util.ResourceBundle;
import nextapp.echo2.app.ContentPane;
import nextapp.echo2.app.ApplicationInstance;
import nextapp.echo2.app.ImageReference;
import nextapp.echo2.app.Insets;
import nextapp.echo2.app.Label;
import nextapp.echo2.app.SplitPane;
import nextapp.echo2.app.Extent;
import echopointng.DirectHtml;
import echopointng.ImageMap;
import nextapp.echo2.app.ResourceImageReference;
import nextapp.echo2.app.layout.ColumnLayoutData;
import nextapp.echo2.app.Alignment;
import nextapp.echo2.app.Grid;
import nextapp.echo2.app.Font;

public class PaneDialogoMensaje extends ContentPane {

	//private Label textoMensaje;
	private DirectHtml textoMensaje;

	private String texto;
	private ImageMap icono;
	private ImageReference referenciaImagen;

	/**
	 * Creates a new <code>demoResourceBundle</code>.
	 */
	public PaneDialogoMensaje(String texto, ImageReference referenciaImagen) {
		super();
		this.referenciaImagen = referenciaImagen;
		this.texto = texto;
		// Add design-time configured components.
		initComponents();
	}

	/**
	 * Configures initial state of component.
	 * WARNING: AUTO-GENERATED METHOD.
	 * Contents will be overwritten.
	 */
	private void initComponents() {

		setInsets(new Insets(new Extent(10)));
		SplitPane splitPane1 = new SplitPane();
		splitPane1.setOrientation(SplitPane.ORIENTATION_HORIZONTAL_LEFT_RIGHT);
		splitPane1.setSeparatorPosition(new Extent(68, Extent.PX));
		add(splitPane1);
		ContentPane contentPane2 = new ContentPane();
		splitPane1.add(contentPane2);
		icono = new ImageMap();
		icono.setImage(referenciaImagen);
		ColumnLayoutData iconoLayoutData = new ColumnLayoutData();
		iconoLayoutData.setAlignment(new Alignment(Alignment.CENTER,
				Alignment.DEFAULT));
		icono.setLayoutData(iconoLayoutData);
		contentPane2.add(icono);
		ContentPane contentPane3 = new ContentPane();
		contentPane3.setInsets(new Insets(new Extent(10)));
		splitPane1.add(contentPane3);
		Grid grid1 = new Grid();
		grid1.setSize(1);
		grid1.setInsets(new Insets(new Extent(2)));
		contentPane3.add(grid1);
		Label label1 = new Label();
		label1.setText("Mensaje");
		label1.setFont(new Font(null, Font.BOLD, new Extent(12, Extent.PT)));
		grid1.add(label1);
		
		//textoMensaje = new Label();
		//textoMensaje.setText(texto);
		textoMensaje = new DirectHtml();
		textoMensaje.setText(texto);
		
		grid1.add(textoMensaje);
	}
}
